
#ifndef COVARIANCE_HPP
#define COVARIANCE_HPP

//#include "Matrix.hpp"
#include "nr_array.h"

class Covariance {
  NRVec<int> m_SortVec;
  NRVec<double> m_OffDiag;
  NRVec<double> m_EigenVal;
  NRMat<double> m_EigenVec;
  bool has_PCA;
public:
  Covariance ( const NRMat<double>& p_EigenVec );
  virtual ~Covariance();
  void PCA();
  void EigenSort(NRVec<int> &s,const NRVec<double> &ev);
  const NRVec<double> EigenValues() const { return m_EigenVal; }
  const NRMat<double> EigenVectors() const { return m_EigenVec; }
  const NRVec<int> SortVec() const { return m_SortVec; }
};

#endif
